import { quality, qualityGradient } from "../face/enums";

// 通用品质工具函数
export const getQualityText = (q: quality): string => {
  const qualityMap = {
    [quality.F]: "F",
    [quality.D]: "D",
    [quality.C]: "C",
    [quality.B]: "B",
    [quality.A]: "A",
    [quality.S]: "S",
    [quality.SS]: "SS",
    [quality.SSS]: "SSS",
    [quality.SR]: "SR",
    [quality.SSR]: "SSR",
  };
  return qualityMap[q] || "未知";
};

// 获取品质渐变背景
export const getQualityGradient = (q: quality): string => {
  const gradientMap = {
    [quality.F]: qualityGradient.F,
    [quality.D]: qualityGradient.D,
    [quality.C]: qualityGradient.C,
    [quality.B]: qualityGradient.B,
    [quality.A]: qualityGradient.A,
    [quality.S]: qualityGradient.S,
    [quality.SS]: qualityGradient.SS,
    [quality.SSS]: qualityGradient.SSS,
    [quality.SR]: qualityGradient.SR,
    [quality.SSR]: qualityGradient.SSR,
  };
  return gradientMap[q] || qualityGradient.F;
}; 